import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  
  {
    path: '/Login',
    component:() => import('../views/Login/LoginPage.vue'),
  
  },
  
  {
  path: '/',
  redirect:'/KnowledgeBase'

  },


  {
    path: '/ChatRoom',
    name: 'ChatRoom',
    component: () => import('../views/ChatRoom/ChatRoomView.vue'),
    meta: {
      title: '交流聊天室'
    }

  },
  {
    path: '/KnowledgeBase',
    name: 'KnowledgeBase',
    component: () => import('../views/KnowledgeBase/KnowledgeBaseView.vue'),
    meta: {
      title: '知识库'
    }
  },
  {
    path: '/Archive',
    name: 'Archive',
    component: () => import('../views/ArchiveFiles/ArchiveView.vue'),
    meta:{
      title:'知识归档'
    }
  },
  {
    path: '/MyPerson',
    name: 'MyPerson',
    component: () => import('../views/Myperson/MyPersonalView.vue'),
    meta:{
      title:'个人中心'
    },
    redirect:'/MyPerson/Collect',
    children:[
     {
     path: '/MyPerson/Collect',
     name: 'Collect',
     component: () => import('../views/Myperson/CollectView.vue'),
     meta:{
      title:'个人收藏'
    
     }
     },
     {
      path: '/MyPerson/Subscribe',
      name: 'Subscribe',
      component: () => import('../views/Myperson/SubscribeView.vue'),
      meta:{
       title:'个人关注'
     
      }
      },
      {
        path: '/MyPerson/Publish',
        name: 'Publish',
        component: () => import('../views/Myperson/PublishView.vue'),
        meta:{
         title:'个人动态'
       
        }
        },
        {
          path: '/MyPerson/PersonalSettings',
          name: 'PersonalSettings',
          component: () => import('../views/Myperson/PersonalSettingsView.vue'),
          meta:{
           title:'个人设置'
         
          }
          },
    ]

    
  },
]

const router = new VueRouter({
  routes,
  mode: 'history', // 使用HTML5 history模式，可以去掉URL中的#
})

export default router
